#include <stdio.h>
#include <math.h>
#include <Windows.h>
int main()
{
	DWORD start = GetTickCount();
	freopen("test.in", "r", stdin);
	freopen("test.out", "w", stdout);
	int n = 0;
	scanf("%d", &n);
	if ( n == 0) {
		printf("1");
		return 0;
	}
	long long ret = 1;
	for ( int i = 2; i <= n; i++ ) {
		ret *= i;
	}
	printf("%lld", ret);
	DWORD time = GetTickCount() - start;
	printf("\ntime = %.2f\n", (1000.0 * time) / 905 );
	fclose(stdin);
	fclose(stdout);
	return 0;
}
